portableSql
SubString Portable SQL Function
Syntax
SubString as C (String as C, Position as N, Length as N)
Arguments
- StringCharacter
A field or value.
- PositionNumeric
The starting position. The first character in the string is position 1.
- LengthNumeric
The number of characters to extract.
Returns
- resultCharacter
Returns a substring.
Description
Returns the portion of String starting at Position and for Length characters.
Discussion
The SubString function extracts a substring from a field or value. If the number of characters to extract exceeds the length of the string, all characters starting at Position are returned.
SubString() function executed on the Northwind Access database
SELECT FIRST 1 SubString(CompanyName,3,5) AS Expr1 FROM Customers =freds